<div id="navigation">
	<a href="{U_HOME}">{DOMAIN} {L_CPANEL_INDEX}</a> :: <a href="{U_SSL_MANAGER}">SSL Manager</a> :: Certificates 
</div>
<br />
<script>
function checkcrt() {
	if ((document.crtform.host.selectedIndex == -1) || (document.crtform.host.options[document.crtform.host.selectedIndex].value == "")) {
		alert("You must select a host that has a key");
		return (false);
	}
}
</script> 
<div class="row1" align="center" width="100%">
	<b>Certificates on Server</b> 
</div>
<br />
<table align="center">
	<tr>
		<th>
			Certificate Domain 
		</th>
		<th>
			Actions 
		</th>
	</tr>
<!-- BEGIN switch_no_crt -->
	<tr>
		<td>
			No SSL Certificates found 
		</td>
		<td>
		</td>
	</tr>
<!-- END switch_no_crt -->
<!-- BEGIN current_crt_row -->
	<tr>
		<td>
			{current_crt_row.KEY_NAME} 
		</td>
		<td>
			<a href="{current_crt_row.U_VIEW}">View</a> :: <a href="{current_crt_row.U_DELETE}">Delete</a> 
		</td>
	</tr>
<!-- END current_crt_row -->
</table>
<br />
<br />
<div class="row1" align="center" width="100%">
	<b>Generate New Certificate</b> 
</div>
<br />
Note that you must generate or upload a key before you can generate any certificates.
<br />
<br />
<form action="{S_GENERATE_CRT}" name="crtform" method="{S_METHOD}" onSubmit="return checkcrt();">
	<table align="center">
		<tr>
			<td>
				Host
			</td>
			<td>
				<select name="host">{S_SSL_KEYS}</select>
			</td>
		</tr>
		<tr>
			<td>
				Country
			</td>
			<td>
				<input type="text" name="country" size="2" maxlength="2">
			</td>
		</tr>
		<tr>
			<td>
				State
			</td>
			<td>
				<input type="text" name="state">
			</td>
		</tr>
		<tr>
			<td>
				City
			</td>
			<td>
				<input type="text" name="city">
			</td>
		</tr>
		<tr>
			<td>
				Company
			</td>
			<td>
				<input type="text" name="company">
			</td>
		</tr>
		<tr>
			<td>
				Company Divison
			</td>
			<td>
				<input type="text" name="companydivision">
			</td>
		</tr>
		<tr>
			<td>
				Email
			</td>
			<td>
				<input type="text" name="email">
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="hidden" name="item" value="crt"> <input type="hidden" name="itemname" value="Certificate"> <input type="submit" value="Generate"> 
			</td>
		</tr>
	</table>
</form>
<br />
<br />
<div class="row1" align="center" width="100%">
	<b>Upload Certificate</b> 
</div>
<br />
<form action="{S_UPLOAD_CRT}" method="{S_METHOD}" ENCTYPE="multipart/form-data">
	<table>
		<tr>
			<td>
				Paste the Certificate in the textbox to the right. 
			</td>
			<td>
				<textarea name="crt" rows="20" cols="60">
				</textarea>
			</td>
		</tr>
		<tr>
			<td>
				Alternatively, choose a .crt file: 
			</td>
			<td>
				<input type="file" name="crtfile"> 
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="Upload"> 
			</td>
		</tr>
	</table>
</form>
